1. Field of the Invention
The present invention relates to an apparatus and method for generating an image for displaying a stationary object and a moving object on a two-dimensional surface by considering their depth relationships.
2. Description of Related Art
In recent years, demand for interaction between a human and a computer, generally known by the term man-machine interface or human-machine interface, has been increasing, and intuitive interactive methods utilizing the five senses of human beings have been developed using such techniques as artificial reality (AR) and virtual reality (VR). Also, in the field of personal computers (PCs), etc., apparatus, exemplified by game machines, have been introduced that provide high-speed image generation and animation functions whereby images change in response to operations performed by human users.
Furthermore, with increasing performance of computer systems, artificial creatures constructed from autonomous object groups have been conceived, and attempts have been made to realize, using a computer, a world where such artificial creatures live. An image generating apparatus for generating images and for displaying the actions of such artificial creatures has been proposed in a patent application filed by the present inventors (U.S. Ser. No. 08/369,110). According to this image generating apparatus, an action pattern that an artificial creature is thinking and wishing to perform is input as a command, and in accordance with the command, desired images are selected from a large number of stored image patterns, to generate and display successive images, thereby presenting the artificial creature's action as images and thus providing a participant with an experience as if he or she is in the real world.
In such an image generating apparatus, since moving objects, such as artificial creatures, and stationary objects, such as trees and mountains, actually existing in three-dimensional space, are displayed on a two-dimensional screen, it should be recognized that display images need to be generated by taking into account depth relationships between these objects. To accomplish this, in the prior art an image showing the overlaying of such objects is generated in the following manner.
Background data representing a stationary object is prepared, and the background thus prepared is drawn over a moving object region (a rectangular region containing the entire area of a moving object) that was drawn in the immediately preceding frame. For example, data of a real video image is input, and a Z value (a value representing the position in the depth direction, the value being larger for an object in the foreground) is compared for all objects to be displayed. Then, after drawing a moving object, a stationary object having a larger Z value than the moving object is drawn.
However, in the above prior art method, the rectangular region containing the entire image of the moving object is treated as a unit when generating a new image for the next frame by considering the depth relationships. This means that, when the moving object moves, depth relationships between objects have to be considered for all the pixels within the rectangular region though, in reality, interframe data changes occur only to part of the pixels within the rectangular region; that is, a large number of pixels are involved in considering the depth relationships, and this slows the processing speed.